<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Warehouse Pro | Inventory Management</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
        body { font-family: 'Inter', sans-serif; }
        .glass-sidebar { background: #1a202c; }
        .stat-card { transition: transform 0.2s; }
        .stat-card:hover { transform: translateY(-2px); }
        .custom-scrollbar::-webkit-scrollbar { width: 4px; }
        .custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
        .custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 10px; }
    </style>
</head>
<body class="bg-slate-50 text-slate-900">

    <div class="flex h-screen overflow-hidden">
        <!-- Sidebar -->
        <aside class="glass-sidebar w-64 flex-shrink-0 hidden md:flex flex-col text-white">
            <div class="p-6 flex items-center space-x-3">
                <div class="w-10 h-10 bg-blue-600 rounded-lg flex items-center justify-center">
                    <i class="fas fa-boxes text-xl"></i>
                </div>
                <span class="text-xl font-bold tracking-tight">Warehouse<span class="text-blue-500">Pro</span></span>
            </div>

            <nav class="flex-1 px-4 space-y-1 mt-4 overflow-y-auto custom-scrollbar">
                <a href="#" class="flex items-center space-x-3 px-4 py-3 rounded-lg bg-blue-600/10 text-blue-400 border border-blue-600/20">
                    <i class="fas fa-th-large w-5"></i>
                    <span class="font-medium">Dashboard</span>
                </a>
                <a href="#" class="flex items-center space-x-3 px-4 py-3 rounded-lg text-slate-400 hover:bg-white/5 hover:text-white transition-all">
                    <i class="fas fa-boxes w-5"></i>
                    <span>Inventory</span>
                </a>
                <a href="#" class="flex items-center space-x-3 px-4 py-3 rounded-lg text-slate-400 hover:bg-white/5 hover:text-white transition-all">
                    <i class="fas fa-calculator w-5"></i>
                    <span>Counting</span>
                </a>
                <a href="#" class="flex items-center space-x-3 px-4 py-3 rounded-lg text-slate-400 hover:bg-white/5 hover:text-white transition-all">
                    <i class="fas fa-chart-line w-5"></i>
                    <span>Reports</span>
                </a>
                <div class="pt-10 pb-4 text-xs font-semibold text-slate-500 uppercase tracking-wider px-4">Administration</div>
                <a href="#" class="flex items-center space-x-3 px-4 py-3 rounded-lg text-slate-400 hover:bg-white/5 hover:text-white transition-all">
                    <i class="fas fa-users-cog w-5"></i>
                    <span>Team Management</span>
                </a>
                <a href="#" class="flex items-center space-x-3 px-4 py-3 rounded-lg text-slate-400 hover:bg-white/5 hover:text-white transition-all">
                    <i class="fas fa-sliders-h w-5"></i>
                    <span>Settings</span>
                </a>
            </nav>

            <div class="p-4 border-t border-white/10">
                <div class="flex items-center space-x-3 px-2">
                    <div class="w-8 h-8 rounded-full bg-slate-700 flex items-center justify-center text-xs font-bold">JD</div>
                    <div class="flex-1 min-w-0">
                        <p class="text-sm font-medium truncate">John Doe</p>
                        <p class="text-xs text-slate-500 truncate">Administrator</p>
                    </div>
                    <button class="text-slate-500 hover:text-white"><i class="fas fa-sign-out-alt"></i></button>
                </div>
            </div>
        </aside>

        <!-- Main Content -->
        <main class="flex-1 flex flex-col min-w-0 overflow-hidden">
            <!-- Header -->
            <header class="h-16 bg-white border-b border-slate-200 flex items-center justify-between px-8">
                <h1 class="text-lg font-semibold">Inventory Management</h1>
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <i class="fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 text-sm"></i>
                        <input type="text" placeholder="Quick search..." class="pl-10 pr-4 py-2 border border-slate-200 rounded-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 w-64 bg-slate-50">
                    </div>
                    <button class="w-10 h-10 rounded-full hover:bg-slate-100 flex items-center justify-center relative">
                        <i class="far fa-bell text-slate-600"></i>
                        <span class="absolute top-2 right-2 w-2 h-2 bg-red-500 rounded-full border-2 border-white"></span>
                    </button>
                </div>
            </header>

            <!-- Dashboard Body -->
            <div class="flex-1 overflow-y-auto p-8 custom-scrollbar">
                
                <!-- Action Bars -->
                <div class="flex flex-col lg:flex-row lg:items-center justify-between mb-8 gap-4">
                    <div class="flex items-center space-x-2">
                        <button onclick="toggleModal('addItemModal')" class="bg-blue-600 hover:bg-blue-700 text-white px-5 py-2.5 rounded-lg text-sm font-semibold flex items-center shadow-sm shadow-blue-200 transition-all">
                            <i class="fas fa-plus mr-2 text-xs"></i> Add New Item
                        </button>
                        <button class="bg-white border border-slate-200 text-slate-700 px-5 py-2.5 rounded-lg text-sm font-semibold hover:bg-slate-50 flex items-center shadow-sm transition-all">
                            <i class="fas fa-file-import mr-2 text-xs text-slate-400"></i> Import CSV
                        </button>
                    </div>
                    <div class="flex items-center space-x-2">
                        <div class="flex bg-white border border-slate-200 rounded-lg p-1">
                            <button class="px-3 py-1.5 text-sm font-medium rounded-md bg-slate-100 text-slate-900 shadow-sm"><i class="fas fa-list"></i></button>
                            <button class="px-3 py-1.5 text-sm font-medium rounded-md text-slate-400 hover:text-slate-600"><i class="fas fa-th"></i></button>
                        </div>
                        <button class="bg-white border border-slate-200 text-slate-700 px-4 py-2.5 rounded-lg text-sm font-semibold hover:bg-slate-50 shadow-sm">
                            <i class="fas fa-download mr-2 text-xs text-slate-400"></i> Export
                        </button>
                    </div>
                </div>

                <!-- Summary Cards -->
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
                    <div class="bg-white p-5 rounded-2xl border border-slate-200 shadow-sm stat-card">
                        <div class="flex items-center justify-between mb-4">
                            <div class="w-10 h-10 bg-blue-50 text-blue-600 rounded-xl flex items-center justify-center">
                                <i class="fas fa-cubes"></i>
                            </div>
                            <span class="text-xs font-bold text-green-500 bg-green-50 px-2 py-1 rounded-full">+12%</span>
                        </div>
                        <p class="text-slate-500 text-xs font-semibold uppercase tracking-wider mb-1">Total SKU</p>
                        <p class="text-2xl font-bold">1,284</p>
                    </div>
                    <div class="bg-white p-5 rounded-2xl border border-slate-200 shadow-sm stat-card">
                        <div class="flex items-center justify-between mb-4">
                            <div class="w-10 h-10 bg-orange-50 text-orange-600 rounded-xl flex items-center justify-center">
                                <i class="fas fa-exclamation-triangle"></i>
                            </div>
                            <span class="text-xs font-bold text-red-500 bg-red-50 px-2 py-1 rounded-full">High</span>
                        </div>
                        <p class="text-slate-500 text-xs font-semibold uppercase tracking-wider mb-1">Low Stock</p>
                        <p class="text-2xl font-bold">42</p>
                    </div>
                    <div class="bg-white p-5 rounded-2xl border border-slate-200 shadow-sm stat-card">
                        <div class="flex items-center justify-between mb-4">
                            <div class="w-10 h-10 bg-purple-50 text-purple-600 rounded-xl flex items-center justify-center">
                                <i class="fas fa-map-marker-alt"></i>
                            </div>
                        </div>
                        <p class="text-slate-500 text-xs font-semibold uppercase tracking-wider mb-1">Active Locations</p>
                        <p class="text-2xl font-bold">18 Stores</p>
                    </div>
                    <div class="bg-white p-5 rounded-2xl border border-slate-200 shadow-sm stat-card">
                        <div class="flex items-center justify-between mb-4">
                            <div class="w-10 h-10 bg-emerald-50 text-emerald-600 rounded-xl flex items-center justify-center">
                                <i class="fas fa-check-double"></i>
                            </div>
                        </div>
                        <p class="text-slate-500 text-xs font-semibold uppercase tracking-wider mb-1">Accuracy Rate</p>
                        <p class="text-2xl font-bold">98.4%</p>
                    </div>
                </div>

                <!-- Filters -->
                <div class="bg-white border border-slate-200 rounded-2xl p-6 mb-8 shadow-sm">
                    <div class="flex items-center mb-6 space-x-2">
                        <i class="fas fa-filter text-blue-500"></i>
                        <h2 class="font-bold text-slate-800 uppercase text-xs tracking-widest">Advanced Filters</h2>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                        <div>
                            <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide">Storage Facility</label>
                            <select class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20">
                                <option>All Locations</option>
                                <option>Main Store</option>
                                <option>Auxiliary Warehouse</option>
                            </select>
                        </div>
                        <div>
                            <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide">Rack System</label>
                            <select class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20">
                                <option>All Racks</option>
                            </select>
                        </div>
                        <div class="flex items-end space-x-2">
                            <div class="flex-1">
                                <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide">Level</label>
                                <select class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20">
                                    <option>All Levels</option>
                                </select>
                            </div>
                            <button class="bg-slate-900 text-white px-6 py-2.5 rounded-xl text-sm font-semibold hover:bg-slate-800 transition-colors">Apply Filters</button>
                        </div>
                    </div>
                </div>

                <!-- Items Table -->
                <div class="bg-white border border-slate-200 rounded-2xl shadow-sm overflow-hidden">
                    <div class="px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/50">
                        <h3 class="font-bold text-slate-700 text-sm">Product Inventory List</h3>
                        <span class="text-xs text-slate-500">Showing 24 of 1,284 items</span>
                    </div>
                    <div class="overflow-x-auto">
                        <table class="w-full text-left">
                            <thead>
                                <tr class="text-slate-500 text-xs font-bold uppercase tracking-wider bg-white">
                                    <th class="px-6 py-4">Product Details</th>
                                    <th class="px-6 py-4">Category</th>
                                    <th class="px-6 py-4">Location</th>
                                    <th class="px-6 py-4">Inventory</th>
                                    <th class="px-6 py-4">Status</th>
                                    <th class="px-6 py-4 text-right">Actions</th>
                                </tr>
                            </thead>
                            <tbody class="divide-y divide-slate-100">
                                <tr class="hover:bg-slate-50/50 transition-colors group">
                                    <td class="px-6 py-4">
                                        <div class="flex items-center">
                                            <div class="w-10 h-10 bg-slate-100 rounded-lg flex items-center justify-center mr-4 text-slate-400 group-hover:bg-blue-50 group-hover:text-blue-500 transition-all font-bold text-xs italic">IMG</div>
                                            <div>
                                                <p class="font-semibold text-sm text-slate-800">ITEM-00124</p>
                                                <p class="text-xs text-slate-500">Industrial Compressor Unit 2HP</p>
                                            </div>
                                        </div>
                                    </td>
                                    <td class="px-6 py-4">
                                        <span class="px-3 py-1 bg-slate-100 text-slate-600 rounded-full text-xs font-medium">Heavy Machinery</span>
                                    </td>
                                    <td class="px-6 py-4">
                                        <div class="text-xs text-slate-800 font-medium">Store A</div>
                                        <div class="text-[10px] text-slate-400 font-bold uppercase">Rack 05 | Level 2 | Bin 12</div>
                                    </td>
                                    <td class="px-6 py-4 text-sm">
                                        <div class="flex items-center space-x-2">
                                            <span class="font-bold">124.00</span>
                                            <span class="text-[10px] text-slate-400 font-bold uppercase">Units</span>
                                        </div>
                                    </td>
                                    <td class="px-6 py-4">
                                        <div class="flex items-center text-green-600 text-xs font-bold italic">
                                            <div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
                                            In Stock
                                        </div>
                                    </td>
                                    <td class="px-6 py-4 text-right">
                                        <div class="flex items-center justify-end space-x-2">
                                            <button class="p-2 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all"><i class="fas fa-edit text-xs"></i></button>
                                            <button class="p-2 text-slate-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-all"><i class="fas fa-trash-alt text-xs"></i></button>
                                        </div>
                                    </td>
                                </tr>
                                <!-- Repeat Row -->
                                <tr class="hover:bg-slate-50/50 transition-colors group">
                                    <td class="px-6 py-4">
                                        <div class="flex items-center">
                                            <div class="w-10 h-10 bg-slate-100 rounded-lg flex items-center justify-center mr-4 text-slate-400 group-hover:bg-blue-50 group-hover:text-blue-500 transition-all font-bold text-xs italic">IMG</div>
                                            <div>
                                                <p class="font-semibold text-sm text-slate-800">ITEM-00125</p>
                                                <p class="text-xs text-slate-500">Hydraulic Fluid Filter G-4</p>
                                            </div>
                                        </div>
                                    </td>
                                    <td class="px-6 py-4">
                                        <span class="px-3 py-1 bg-slate-100 text-slate-600 rounded-full text-xs font-medium">Consumables</span>
                                    </td>
                                    <td class="px-6 py-4">
                                        <div class="text-xs text-slate-800 font-medium">Store B</div>
                                        <div class="text-[10px] text-slate-400 font-bold uppercase">Rack 02 | Level 1 | Bin 04</div>
                                    </td>
                                    <td class="px-6 py-4 text-sm">
                                        <div class="flex items-center space-x-2">
                                            <span class="font-bold text-red-600">5.00</span>
                                            <span class="text-[10px] text-slate-400 font-bold uppercase">Pcs</span>
                                        </div>
                                    </td>
                                    <td class="px-6 py-4 text-xs font-bold italic">
                                        <div class="flex items-center text-red-600">
                                            <div class="w-2 h-2 rounded-full bg-red-500 mr-2 animate-pulse"></div>
                                            Low Stock
                                        </div>
                                    </td>
                                    <td class="px-6 py-4 text-right">
                                        <div class="flex items-center justify-end space-x-2">
                                            <button class="p-2 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all"><i class="fas fa-edit text-xs"></i></button>
                                            <button class="p-2 text-slate-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-all"><i class="fas fa-trash-alt text-xs"></i></button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <!-- Add Item Modal -->
    <div id="addItemModal" class="fixed inset-0 bg-slate-900/40 backdrop-blur-sm hidden z-50 flex items-center justify-center p-4">
        <div class="bg-white w-full max-w-2xl rounded-3xl shadow-2xl overflow-hidden border border-slate-200">
            <div class="p-6 border-b border-slate-100 flex items-center justify-between">
                <h2 class="text-lg font-bold">Register New Inventory Item</h2>
                <button onclick="toggleModal('addItemModal')" class="text-slate-400 hover:text-slate-600"><i class="fas fa-times"></i></button>
            </div>
            <div class="p-8 max-h-[80vh] overflow-y-auto custom-scrollbar">
                <form class="grid grid-cols-1 md:grid-cols-2 gap-6">
                    <div class="md:col-span-1">
                        <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide">Item Code *</label>
                        <input type="text" placeholder="e.g. SKU-12345" class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20">
                    </div>
                    <div class="md:col-span-1">
                        <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide">Item Group</label>
                        <input type="text" placeholder="e.g. Electronics" class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20">
                    </div>
                    <div class="md:col-span-2">
                        <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide">Full Description *</label>
                        <textarea rows="2" placeholder="Detailed product description..." class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20"></textarea>
                    </div>
                    <div class="grid grid-cols-3 gap-3 md:col-span-2">
                        <div>
                            <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide text-center">Store</label>
                            <input type="text" class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 text-center">
                        </div>
                        <div>
                            <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide text-center">Rack</label>
                            <input type="text" class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 text-center">
                        </div>
                        <div>
                            <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide text-center">Level</label>
                            <input type="text" class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 text-center">
                        </div>
                    </div>
                    <div class="md:col-span-1">
                        <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide">Unit of Measure</label>
                        <select class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20">
                            <option>Pieces (Pcs)</option>
                            <option>Kilograms (Kg)</option>
                            <option>Litres (L)</option>
                            <option>Units (U)</option>
                        </select>
                    </div>
                    <div class="md:col-span-1">
                        <label class="block text-xs font-bold text-slate-500 mb-2 uppercase tracking-wide">Initial System Qty</label>
                        <input type="number" placeholder="0.00" class="w-full bg-slate-50 border border-slate-200 rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20">
                    </div>
                </form>
            </div>
            <div class="p-6 border-t border-slate-100 bg-slate-50 flex items-center justify-end space-x-3">
                <button onclick="toggleModal('addItemModal')" class="text-sm font-semibold text-slate-500 hover:text-slate-800 px-4 py-2">Cancel</button>
                <button class="bg-blue-600 hover:bg-blue-700 text-white px-8 py-2.5 rounded-xl text-sm font-semibold shadow-sm shadow-blue-200 transition-all">
                    Register Item
                </button>
            </div>
        </div>
    </div>

    <script>
        function toggleModal(id) {
            const modal = document.getElementById(id);
            modal.classList.toggle('hidden');
        }

        // Close modal on escape key
        window.addEventListener('keydown', (e) => {
            if (e.key === 'Escape') {
                const modals = document.querySelectorAll('.fixed');
                modals.forEach(m => m.classList.add('hidden'));
            }
        });
    </script>

</body>
</html>